<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script src="./js/axios.js"></script>
    <script>
        // axios post发送请求
        // axios.post('http://localhost:3000/axios', {
        //     uname: 'ls',
        //     pwd: 123
        // }).then((data) => {
        //     console.log(data)
        //     const { data: res } = data
        //     console.log(res)
        // })

        // axios put发送请求
        axios.put('http://localhost:3000/axios/1', {
            uname: 'ls',
            pwd: 123
        }).then((data) => {
            console.log(data)
            const { data: res } = data
            console.log(res)
        })

    </script>
</body>

</html>